package com.lantu.draw.svgimg.service;

import org.springframework.beans.factory.annotation.Autowired;



import org.springframework.stereotype.Service;

import com.lantu.draw.svgimg.mapper.SVGFavoriteMapper;
import com.lantu.draw.svgimg.vo.SVGFavoriteVO;
@Service
public class SVGFavoriteServiceImpl implements SVGFavoriteService {
	@Autowired
	SVGFavoriteMapper favoriteImgMapper;
	@Override
	public int save(SVGFavoriteVO vo) {
		
		//不可重复插入
		if(favoriteImgMapper.querycnImgFavoriteByUsrId(vo)==0){
			return favoriteImgMapper.save(vo);
		}
		return 0;
	}

	@Override
	public int delete(int id) {
		return favoriteImgMapper.delete(id);
	}

}
